
    <div class="layui-col-xs12">
    <div class="layui-card">
    	<div class="layui-card-header">
      		<h2>微信授权设置</h2>
      	</div>
      	<div class="layui-card-body">
      		<span class="name"></span>
		      <form action="" class="layui-form">
		      	<table class="layui-table" style="table-layout:fixed" lay-size="lg">
				      <colgroup>
					    <col width="62">
					    <col width="500">
					  </colgroup>
				      <tbody>
					    <tr>
					      <td class="short">AppId:</td>
					      <td><input type="text" name="Appid" class="AppId layui-input" /><button class="layui-btn copy-AppId" type="button">复制</button></td>
					    	
					    </tr>
					    <tr>
					      <td class="short">AppSecret:</td>
					      <td><input type="text" name="AppId" class="AppSecret layui-input" /><button class="layui-btn copy-AppSecret" type="button">复制</button></td>
					      
					    </tr>
					    
					    
					    
					    
					    
					  </tbody>
				      	
			      </table>
		      	
		      		<!--<div class="save-warp">
		      			<div class="layui-input-block save">
					      <button class="layui-btn confirm" lay-submit lay-filter="formDemo">保存</button>
					    </div>
		      		</div>-->
		      		
				    
		      </form>
		      <span class="_name"></span>
		      <form action="" class="layui-form">
		      	<table class="layui-table" style="table-layout:fixed" lay-size="lg">
				      <colgroup>
					    <col width="62">
					    <col width="500">
					  </colgroup>
				      <tbody>
					    <tr>
					      <td class="short">AppId:</td>
					      <td><input type="text" name="Appid"  class="_AppId layui-input" /><button class="layui-btn copy-AppId2" type="button">复制</button></td>
					    	
					    </tr>
					    <tr>
					      <td class="short">AppSecret:</td>
					      <td><input type="text" name="AppId"  class="_AppSecret layui-input" /><button class="layui-btn copy-AppSecret2" type="button">复制</button></td>
					      
					    </tr>
					    
					    
					    
					    
					    
					  </tbody>
				      	
			      </table>
		      	
		      		<!--<div class="save-warp">
		      			<div class="layui-input-block save">
					      <button class="layui-btn confirm" lay-submit lay-filter="formDemo">保存</button>
					    </div>
		      		</div>-->
		      		
				    
		      </form>
      </div>
      </div>
      
      <style scoped>
      	.title{
      		margin-left: 30px;
      		margin-top: 30px;
      	}
      	.short{
      		
      	}
      	input[type="text"]{
      		outline: none;
      		width: 60%;
      		display: inline-block;
      		margin-right: 30px;
      	}
      	input[type="password"]{
      		outline: none;
      		width: 60%;
      		display: inline-block;
      		margin-right: 30px;
      	}
      	.confirm{
      		width: 250px;
      	}
      	.save-warp{
      		width: 100%;
      		text-align: center;
      	}
      	.save{
      		margin-top: 30px;
      		width: 200px;
      		display: inline-block;
      	}
      	/*.copy{
      		display: inline-block;
      	}*/
      	
      </style>
      
      
      
      
    </div>


<script type="text/javascript">
	let AppId = document.querySelector(".AppId");
	let AppSecret = document.querySelector(".AppSecret");
	let _AppId = document.querySelector("._AppId");
	let _AppSecret = document.querySelector("._AppSecret");
	let name = document.querySelector(".name");
	let copyAppId = document.querySelector(".copy-AppId");
	let copyAppId2 = document.querySelector(".copy-AppId2");
	let copyAppSecret = document.querySelector(".copy-AppSecret");
	let copyAppSecret2 = document.querySelector(".copy-AppSecret2");
	let _name = document.querySelector("._name");
	
	DBHelper.Get("Admin_Xn_WxConfig",function(data){
		console.log(data)
		AppId.value = data[0].AppId;
		AppSecret.value = data[0].AppSecret;
		name.innerText = data[0].Name;
		_AppId.value = data[1].AppId;
		_AppSecret.value = data[1].AppSecret;
		_name.innerText = data[1].Name;
	},function(data){	
		console.log(data)
	})
	
	copyAppId.addEventListener("click",function(){
		AppId.select();
		document.execCommand("Copy");
		alert('复制成功');
	
	})
	
	copyAppSecret.addEventListener("click",function(){
		AppSecret.select();
		document.execCommand("Copy");
		alert('复制成功');
	
	})
	
	copyAppId2.addEventListener("click",function(){
		_AppId.select();
		document.execCommand("Copy");
		alert('复制成功');
	
	})
	
	copyAppSecret2.addEventListener("click",function(){
		_AppSecret.select();
		document.execCommand("Copy");
		alert('复制成功');
	
	})
</script>